﻿using EnumHelpers;
using Interview.Model.Enum;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;

namespace Interview.Model
{
    /// <summary>
    /// 配料
    /// </summary>
    public class Ingredient
    {
        public string Name { get; set; }
        public IngredientgradeEnum Grade { get; set; }

        public Ingredient(string name, IngredientgradeEnum Grade)
        {
            this.Name = name;
            this.Grade = Grade;
        }

        // 获取配料的等级描述
        public string GetLevelDescription()
        {
            switch (Grade)
            {
                case IngredientgradeEnum.Less: return "少";
                case IngredientgradeEnum.Medium: return "中";
                case IngredientgradeEnum.More: return "多";
                default: return "";
            }
        }
        public override string ToString()
        {
            return $"{GetLevelDescription()}{Name}";
        }
    }
}
